﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;

namespace FIS.iDET
{   
    static class Program
    {
        // Setup a unique Name for your Application
        static Mutex mutex = new Mutex(true, "{8C6524D3-7CC9-4148-80AE-FEEA035FFE01}");
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            if (GlobalConstants.IsTri && DateTime.Now.CompareTo(GlobalConstants.ExpDate) > 0)
            {
                MessageBox.Show("Date_Time_Problem, contact Developer");
                return;
            }

            if (mutex.WaitOne(TimeSpan.Zero, true))
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new InputToolForm());
                mutex.ReleaseMutex();
            }
            else
            {
                MessageBox.Show("The application is running already!", "Warning",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
    }
}
